﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace BGSpaceShooter
{
    public class StarSphere : IDrawable
    {
        public Model Model { get; set; }
        public Texture2D Texture { get; set; }
        public const float Size = 5000.0f;

        public StarSphere()
        {
            Model = GameContentManager.Content.GetModel("StarDome");

            Texture = ((BasicEffect)Model.Meshes[0].MeshParts[0].Effect).Texture;

            Model.Meshes[0].MeshParts[0].Effect = TechniqueProvider.GetEffect("StarSphere").Clone();

            Model.Meshes[0].MeshParts[0].Effect.CurrentTechnique =
                Model.Meshes[0].MeshParts[0].Effect.Techniques["StarSphere"];
        }

        #region IDrawable Members

        public IDrawer GetDrawer()
        {
            return new StarSphereDrawer(this);
        }

        #endregion
    }
}
